i
%option noyywrap
%{
#include<set>
#include<string>
#include<iostream>

using namespace std;

int count=0;
long long int temp=0;
static char *id = "201492317";
static char *name ="LH";
set<int> table;
%}

%%

^([1-9][0-9]*) {
         if(yyleng==9)
	 	 {
		 	     printf("%s", id);
			     	 }
				 	 else
					 	 {
						 	      temp=(long long int)(atoi(yytext)*2 + atoi(id));
							      	      cout<<temp;
								      	      count++;
									      	      table.insert(temp);
										      	 }
											 }


											 NAME$  {
											           printf("%s",name);
												   	  }

													  ([1-9][0-9]*|0) {
													  	temp=(long long int)(atoi(yytext) * 2 + atoi(id));
														       cout<<temp;
														              table.insert(temp);
															             count++;
																            }


																	    ([1-9]+\.[0-9]+)  {
																	            printf("%ld", (long long int)(atof(yytext) *2 + atoi(id)+0.5));
																		            table.insert((long long int)(atof(yytext) *2 + atoi(id)+0.5));
																			    	count++;
																					}

																					. {ECHO;}

%%

																					int main()
																					{
																					yylex();
																					printf("出现次数: %d\t去重次数: %d\n", count, table.size());
																					return 0;
																					}


